<?php

namespace app\index\validate;

use think\Validate;

class CreateShare extends Validate
{
    protected $rule=[
        'cream_id'=>'require',
        'title'   => 'require',
        'msg'     => 'require',
        'img'     => 'require',
        'shop_url'     => 'require|url',
        'remark'  => 'require',
    ];

    protected $message=[
        'cream_id.require'=> '缺少摄像头id',
        'title.require'=>'缺少分享标题',
        'msg.require'=>'缺少分享内容',
        'img.require'=>'缺少分享图片',
        'shop_url.require'          => '缺少购买链接',
        'shop_url.url'              => "购买链接格式不对",
        'remark.require'    =>  "缺少备注",
    ];
}